import type { AppRouteModule } from '/@/router/types';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const dashboard: AppRouteModule = {
  path: '/systemManagement',
  name: 'systemManagement',
  component: LAYOUT, //看上去是一个公共组件，作用是生成一个菜单栏样式
  redirect: '/systemManagement/index',
  meta: {
    hideChildrenInMenu: false, //看上去是是否展示子菜单的
    icon: 'simple-icons:about-dot-me',
    title: t('routes.dashboard.systemManagement'), //看上去是做语言适配的
  },
  children: [
    {
      path: 'userManagement',
      name: 'userManagement',
      component: () => import('/@/views/system-management/user-management/index.vue'), //卧槽。这个文件必须要以vue结尾(写完整路径)，不然就一直报错：TS2307: Cannot find module '/@/views/system-management/user-management/index' or its corresponding type declarations.
      meta: {
        title: t('routes.dashboard.userManagement'),
      },
    },
  ],
};

export default dashboard;
